const defaultState = {
  homeValue: [{ username: "乔子", age: 66 }],
};
const home = (state = defaultState, action) => {
  const { type, payload } = action;
  switch (type) {
    case "change_homeValue":
      const newState = JSON.parse(JSON.stringify(state));
      console.log(payload);
      newState.homeValue = payload;
      // 返回新的state
      return newState;
    default:
      return state;
  }
};
export default home;
